package com.atguigu.lease.common.exception;

import com.atguigu.lease.common.result.ResultCodeEnum;
import com.atguigu.lease.model.enums.ItemType;
import lombok.Getter;

/**
 * @author = 赵子涵
 * @date = 2025/5/7 21:02
 * @function =
 */
@Getter
public class LeaseException extends RuntimeException {
    private Integer code;

    public LeaseException(Integer code, String meg) {
        super(meg);
        this.code = code;
    }
    public LeaseException(ResultCodeEnum resultCodeEnum){
        super(resultCodeEnum.getMessage());
        this.code=resultCodeEnum.getCode();
    }
}
